package com.example.novelstory.dao.dxy;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.novelstory.entity.Category;
import org.apache.ibatis.annotations.Mapper;

@Mapper//Dao层的注解

public interface CategoryDao extends BaseMapper<Category> {
//    @Select("select * from category")
//    public List<Category> findcategoryAll();
//
//    @Insert("INSERT INTO category(title, pid, sort, meta_title, meta_keywords, meta_description,icon,template_index,template_detail,template_filter,link,create_time,update_time,status,type) VALUES(#{title,jdbcType=VARCHAR},#{pid,jdbcType=VARCHAR},#{sort,jdbcType=VARCHAR},#{meta_title,jdbcType=VARCHAR},#{meta_keywords,jdbcType=VARCHAR},#{meta_description,jdbcType=VARCHAR},#{icon,jdbcType=VARCHAR},#{template_index,jdbcType=VARCHAR},#{template_detail,jdbcType=VARCHAR},#{template_filter,jdbcType=VARCHAR},#{link,jdbcType=VARCHAR},#{create_time,jdbcType=VARCHAR},#{update_time,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR})")
//    public int addcategoryInfo(@Param("title") String title, @Param("pid") int pid, @Param("sort") int sort, @Param("meta_title") String meta_title, @Param("meta_keywords") String meta_keywords, @Param("meta_description") String meta_description, @Param("icon") String icon, @Param("template_index") String template_index, @Param("template_detail") String template_detail, @Param("template_filter") String template_filter, @Param("link") int link, @Param("create_time") int create_time, @Param("update_time") int update_time, @Param("status") String status, @Param("type") int type);
//
//    @Delete("DELETE FROM category WHERE id=#{id,jdbcType=VARCHAR}")
//    public int deletecategoryInfo(int id);
//
//    @Update("UPDATE category SET pid=#{pid,jdbcType=VARCHAR},sort=#{sort,jdbcType=VARCHAR},meta_title=#{meta_title,jdbcType=VARCHAR},meta_keywords=#{meta_keywords,jdbcType=VARCHAR},meta_description=#{meta_description,jdbcType=VARCHAR},icon=#{icon,jdbcType=VARCHAR},template_index=#{template_index,jdbcType=VARCHAR},template_detail=#{template_detail,jdbcType=VARCHAR},template_filter=#{template_filter,jdbcType=VARCHAR},link=#{link,jdbcType=VARCHAR},create_time=#{create_time,jdbcType=VARCHAR},update_time=#{update_time,jdbcType=VARCHAR},status=#{status,jdbcType=VARCHAR},type=#{type,jdbcType=VARCHAR} WHERE title=#{title,jdbcType=VARCHAR}")
//    public int updetecategoryInfo(@Param("title") String title, @Param("pid") int pid, @Param("sort") int sort, @Param("meta_title") String meta_title, @Param("meta_keywords") String meta_keywords, @Param("meta_description") String meta_description, @Param("icon") String icon, @Param("template_index") String template_index, @Param("template_detail") String template_detail, @Param("template_filter") String template_filter, @Param("link") int link, @Param("create_time") int create_time, @Param("update_time") int update_time, @Param("status") String status, @Param("type") int type);

}
